package Test4;

import java.util.Scanner;

//兵工厂
public class PizzaPlant {
    Pizza pizza;
    double price;
    int size;
    public void make(){
        Scanner in=new Scanner(System.in);
        System.out.println("请输入你要支制作的披萨：(1.海鲜比萨  2.培根披萨):");
        int num=in.nextInt();
            System.out.println("请输入培根大小:");
            int size = in.nextInt();
            System.out.println("请输入培根价格:");
            double price = in.nextDouble();
        switch (num) {
            case 1:
                pizza = new BaconPizza(price, size);
            case 2:
                pizza = new SeafoodPizza(price, size);
        }
        pizza.showInfo();
    }
}
